import unittest

from selenium import webdriver
from time import sleep
from asms import ASMS
from options import options
from selenium.webdriver.support.wait import WebDriverWait
url = r'http://172.16.22.111:8080/bsams/front/login.do'


class UpDown(unittest.TestCase):
    def setUp(self) -> None:
        self.driver = webdriver.Chrome(options=options)
        self.driver.get(url)
        self.driver.maximize_window()


    def tearDown(self) -> None:
        self.driver.quit()


class UpDown2(unittest.TestCase):


    @classmethod
    def setUpClass(cls) -> None:
        cls.driver = webdriver.Chrome(options=options)
        cls.driver.get(url)
        cls.driver.maximize_window()
        cls.driver.implicitly_wait(10)
        asms = ASMS(cls.driver)
        asms.login('1','test01','123456','shtd')

    @classmethod
    def tearDownClass(cls) -> None:
        cls.driver.quit()
if __name__ == '__main__':
    unittest.main()